package de.ryancarmon.validator.exc;

public class CastingFailedException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private Object object;
	private String target;

	public CastingFailedException(Object object, String target) {
		this.object = object;
		this.target = target;
	}

	@Override
	public String getMessage() {
		return String.format("Failed casting %1$s to %2$s.", object, target);
	}

}
